<?php /*a:1:{s:65:"/www/wwwroot/www.moxiongdi.com/app/admin/view/feedback/index.html";i:1698050634;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title><?php echo htmlentities($pagetitle); ?></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/static/admin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/admin/style/admin.css" media="all">
    <link rel="stylesheet" href="/static/admin/style/global.css" media="all">
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">

        <div class="layui-card-header layuiadmin-card-header-auto">
            <div>
                <div class="header-left" style="width:80%">
                    <div class="layui-inline">
                        <a class="layui-btn <?php if(app('request')->param('catid')==false): ?>on<?php else: ?>layui-btn-primary<?php endif; ?>" href="<?php echo url('index'); ?>">所有</a>
                        <?php foreach($cat as $v): ?>
                        <a class="layui-btn <?php if(app('request')->param('catid')==$v['catid']): ?>on<?php else: ?>layui-btn-primary<?php endif; ?>"
                           href="<?php echo url('index',['catid'=>$v['catid']]); ?>"><?php echo htmlentities($v['name']); ?></a>
                        <?php endforeach; ?>
                    </div>
                </div>
                <div class="header-right search-field" style="width:18%;">
					<?php if(app('request')->param('catid')): ?>
                    <div class="layui-inline">
                        <a href="<?php echo url('export',['catid'=>app('request')->param('catid')]); ?>" class="layui-btn layui-btn-primary layuiadmin-btn-list"><i class="layui-icon layui-icon-export"></i> 导出</a>	
                    </div>
					<?php endif; ?>
                    <div class="layui-inline">
                        <a href="<?php echo url('FeedbackCat/index'); ?>" data-width="100%" data-height="100%" class="layui-btn layui-btn-primary iframe"><i class="layui-icon layui-icon-tabs layuiadmin-button-btn"></i> 分类管理</a>
                    </div>
                </div>
                <div class="clear"></div>
            </div>


        </div>

        <div class="layui-card-body">
            <form class="layui-form" action="<?php echo url(); ?>" onsubmit="return save_form(this)">
                <table class="layui-table">
                    <thead>
                    <tr>
						<th width="3%"><input type="checkbox" value="0" class="checkall" lay-ignore></input></th>
                        <th width="3%">ID</th>
                        <th width="10%">分类</th>
                        <th width="10%">姓名</th>
                        <th width="15%">手机</th>
						<th width="10%">时间</th>
                        <th width="15%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($data as $key=>$v): ?>
                    <tr>
						<td style="text-align: center;"><input type='checkbox' class="chekboxs" name="ids[]" lay-ignore value="<?php echo htmlentities($v['id']); ?>"></td>
                        <td style="text-align: center;"><?php echo htmlentities($v['id']); ?></td>
                        <td class="center tab-title"><a href="<?php echo url('index',['catid'=>$v['catid']]); ?>">[<?php echo htmlentities($v['cat']['name']); ?>]</a></td>
                        <td class="center"><?php echo htmlentities($v['name']); if($v['is_read']==1): ?>
						<span class="layui-badge layui-bg-gray">已读</span>
						<?php else: ?>
						<span class="layui-badge layui-bg-red">未读</span>
						<?php endif; ?>
						</td>
                        <td class="center"><?php echo htmlentities($v['mobile']); ?></td>
                        <td class="center"><?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($v['addtime'])? strtotime($v['addtime']) : $v['addtime'])); ?></td>
                        <td class="center">
                            <a href="<?php echo url('view',array('id'=>$v['id'])); ?>" target="_blank" class="layui-btn layui-btn-sm iframe" title="查看" data-width="70%" data-height="80%"><i class="layui-icon">&#xe615;</i></a>
                            <a href="<?php echo url('delete',array('ids[]'=>$v['id'])); ?>" class="layui-btn layui-btn-sm ajax_del"><i class="layui-icon">&#xe640;</i></a>
                        </td>

                    </tr>

                    <?php endforeach; ?>
                    </tbody>
                </table>
				<div class="layui-inline">
					<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" onclick="this_delete()">删除</button>	
					<button class="layui-btn layui-btn-sm" onclick="$('.layui-form').attr('action','<?php echo url("setRead"); ?>');$('.layui-form').submit();" type="button">设为已读</button>
				</div> 				
				<div class="listpage"><?php echo $pagelist; ?></div>
            </form>
        </div>

    </div>
</div>

<script src="/static/admin/layui/layui.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/globals.js"></script>
<!--文件上传的预览功能中中也需要用到我 fancybox plus start-->
<link rel="stylesheet" type="text/css" href="/static/fancybox3/jquery.fancybox.min.css" media="screen" />	

<script type="text/javascript" src="/static/fancybox3/jquery.fancybox.min.js"></script>
<!--文件上传的预览功能中中也需要用到我 fancybox plus end-->
<script>
    layui.config({
        base: '/static/admin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form'], function () {
        var $ = layui.$
            , admin = layui.admin
            , element = layui.element
            , form = layui.form;
        form.render(null, 'component-form-element');
        element.render('breadcrumb', 'breadcrumb');

    });
    //删除
    function this_delete(){
        layer.confirm("您确定要删除吗？",function(){
            $('.layui-form').attr('action','<?php echo url('delete'); ?>');
            $('.layui-form').submit();
        },function(){layer.closeAll();return false;});
    }

</script>

</body>
</html>
